<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link 	href="../../../css/simple.css" rel="stylesheet" type="text/css" charset="utf-8" />
<script src="../../../scripts/raphael.js"></script>
<script src="../../../scripts/FormUtil.js" charset="utf-8"></script>
<script src="../../../scripts/util2.js"></script>
<script src="../../../scripts/2dcanvas.js"></script>
<script src="../map.js"></script>
<style>
	div{ border:solid 1px #CCCCCC; padding:5px; min-width:100px; min-height:30px}
	#container{width:100%;height:800px;}
	#left_bar{width:20%; height:100%;}
		#left_bar div{width:100%;}
			#area_thum{width:200px;height:200px}
		#area_form{height:80%;}
	#main{width:76%; height:80%;}
		#hallDiv{position:relative;width:96%; height:100%;}
</style>
<script>
	window.onload=function(){
		var divlist = document.getElementsByTagName('div');
		for(var i=100;i<divlist.length;i++){
			var div = divlist[i];
			div.style.backgroundColor = StringUtil.getColor(0x000066, i);
			
		}
		
		initArea();
	}
	
	var hall;
	
	function initArea(){
		hall = new Place('hall_canvas', 800, 500, 'https://www.baidu.com/img/bd_logo1.png');
		hall.display();
		hall.startRecordPath();
	}
	
	function save(){
		var params = FormUtil.getFormJson('area_form1');
		var pathStr = hall.getPath();
		params.path = pathStr;
		ajaxRequest('save.json', params, function(result){
			alert('保存成功！');
		});
	}
</script>
</head>

<body>
    <div id="container">
      <div id="left_bar" class="fl">
        <div>
            <select name="select_area" id="select_area">
              <option value="">新建</option>
            </select>
        </div>
        <div><img id="area_thum" src=""/></div>
        <div id="area_form">
            <form id="area_form1">
                <input name="" type="text" />
                <input type="button" value="保存" />
            </form>
        </div>
      </div>
      <div id="main" class="fl">
        <div id="toolbar"></div>
        <div id="hallDiv">
        	<div id="hall_canvas"></div>
        </div>
      </div>
    </div>
</body>
</html>
